package com.example.lottery.service.dto;

import com.example.lottery.service.enums.ActivityPrizeStatusEnum;
import com.example.lottery.service.enums.ActivityPrizeTierEnum;
import com.example.lottery.service.enums.ActivityStatusEnum;
import com.example.lottery.service.enums.ActivityUserStatusEnum;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ActivityDetailDTO {
    private Long activityId;
    private String activityName;
    private String desc;
    private ActivityStatusEnum status;

    public boolean valid() {
        return status.equals(ActivityStatusEnum.RUNNING);
    }

    private List<PrizeDTO> prizeListDTO;

    private List<UserDTO> userListDTO;

    @Data
    public static class PrizeDTO {
        private Long prizeId;
        private String name;
        private String imageUrl;
        private BigDecimal price;
        private String description;
        private ActivityPrizeTierEnum tiers;
        private Long prizeAmount;
        private ActivityPrizeStatusEnum status;
        public boolean valid() {
            return status.equals(ActivityPrizeStatusEnum.INIT);
        }
    }

    @Data
    public static class UserDTO {
        private Long userId;
        private String userName;
        private ActivityUserStatusEnum status;
        public boolean valid() {
            return status.equals(ActivityUserStatusEnum.INIT);
        }
    }
}
